import axios from '@/utils/request';

import config from '@/common/config'

let base = config.getMkBasePath();

//默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:1,pageSize:10,total:0}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，

//普通查询
export const listBaseInfo = params => { return axios.get(`${base}/mk/mng/card/baseInfo/list`, { params: params }); };
//测试 export const  mmg= params => { return axios.get(`/mmg/wxa/qrcode/showWxaQrcode?scene=1&page=1&width=1&autoColor=1&userid=1`, { params: params }); };
//微信获取图文消息列表
export const batchgetMaterial= params => { return axios.get(`${base}/mk/mng/card/baseInfo/batchgetMaterial`, { params: params }); };
//微信获取图文消息总数
export const getMaterialcount= params => { return axios.get(`${base}/mk/mng/card/baseInfo/getMaterialcount`, { params: params }); };
//关键字模糊查询 {字段1:v1,字段2:v1,字段3:v1},字段驼峰命名，条件之间默认为or关系
//export const listBaseInfoKey = params => { return axios.get(`${base}/mk/mng/card/baseInfo/listKey`, { params: params }); };
export const getCardInfo = params => { return axios.get(`${base}/mk/mng/card/baseInfo/getCardInfo`, { params: params }); };

//删除一个
export const delBaseInfo = params => { return axios.post(`${base}/mk/mng/card/baseInfo/del`,params); };

//批量删除
export const batchDelBaseInfo = params => { return axios.post(`${base}/mk/mng/card/baseInfo/batchDel`, params); };

//修改一个
export const editBaseInfo = params => { return axios.post(`${base}/mk/mng/card/baseInfo/edit`, params); };

//新增一个
export const addBaseInfo = params => { return axios.post(`${base}/mk/mng/card/baseInfo/add`, params); };

//查所有的卡劵（分销）
 export const listAllCard = params => { return axios.get(`${base}/mk/mng/card/baseInfo/listAllCard`, { params: params }); };